package com.ielts.model;

import vn.com.hoasua.database.adbException;
import vn.com.hoasua.database.adbObject;

@SuppressWarnings("serial")
public class IeltsItem extends adbObject{
	public static final String CLASS_UNIQUE="IeltsItem";
	public static final int NUM_FIELDS=5;
	
	public String id="";
	public String month="";
	public String date="";
	public String content="";
	public boolean buyed = false;
	
	public IeltsItem(int index, String... values) {
		super(index, values);
		
		try {
			if (values.length != NUM_FIELDS)
				throw new adbException(CLASS_UNIQUE+" length values invalid!");
		} catch (adbException e) {
			e.printStackTrace();
		}
		this.id = values[0];
		this.month=values[1];
		this.date=values[2];
		this.content = values[3];
		this.buyed = Boolean.valueOf(values[4]);
	}
	@Override
	public String[] getValues() {
		values[0]=id;
		values[1]=month;
		values[2]=date;
		values[3]=content;
		values[4]=buyed+"";
		return values;
	}
}

